<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>首页</title>
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
  <style>
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      background-color: #f5f5f5;
      color: #333;
      padding-bottom: 70px;
    }
    .t-card {
      background: white;
      border-radius: 12px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
      padding: 16px;
      margin-bottom: 16px;
    }
    .t-card-header {
      font-size: 18px;
      font-weight: 600;
      color: #0052d9;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .t-table {
      width: 100%;
      border-collapse: collapse;
    }
    .t-table th, .t-table td {
      padding: 12px 8px;
      text-align: left;
      border-bottom: 1px solid #e5e5e5;
    }
    .t-table th {
      font-weight: 500;
      color: #666;
      font-size: 14px;
    }
    .t-tabbar {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      display: flex;
      background: white;
      box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
      height: 60px;
      z-index: 100;
    }
    .t-tabbar-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: #666;
      font-size: 12px;
    }
    .t-tabbar-item.active {
      color: #0052d9;
    }
    .t-tabbar-icon {
      font-size: 24px;
      margin-bottom: 2px;
    }
    .food-amount {
      display: inline-block;
      width: 70px;
      height: 10px;
      background-color: #e0e0e0;
      border-radius: 5px;
      overflow: hidden;
    }
    .food-amount-fill {
      height: 100%;
      background-color: #0052d9;
    }
    .status-low {
      background-color: #e34d59;
    }
    .status-medium {
      background-color: #ed7b2f;
    }
    .status-high {
      background-color: #00a870;
    }
    .recipe-day {
      font-weight: 600;
      color: #0052d9;
      padding: 8px 0;
      border-bottom: 1px solid #e5e5e5;
      margin-bottom: 8px;
    }
    .recipe-meal {
      margin-bottom: 12px;
    }
    .recipe-meal-title {
      font-weight: 500;
      margin-bottom: 4px;
    }
    .recipe-meal-content {
      color: #666;
      font-size: 14px;
    }
  </style>
</head>
<body>
  <div class="p-4">
    <div class="t-card">
      <div class="t-card-header">
        <span>冰箱剩余食材</span>
        <span class="text-sm font-normal text-gray-500">更新于今天 08:30</span>
      </div>
      <table class="t-table">
        <thead>
          <tr>
            <th>食材</th>
            <th>剩余量</th>
            <th>状态</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>土豆</td>
            <td>
              <div class="food-amount">
                <div class="food-amount-fill status-high" style="width: 80%"></div>
              </div>
            </td>
            <td class="text-green-600">充足</td>
          </tr>
          <tr>
            <td>西红柿</td>
            <td>
              <div class="food-amount">
                <div class="food-amount-fill status-medium" style="width: 50%"></div>
              </div>
            </td>
            <td class="text-yellow-600">适中</td>
          </tr>
          <tr>
            <td>胡萝卜</td>
            <td>
              <div class="food-amount">
                <div class="food-amount-fill status-low" style="width: 20%"></div>
              </div>
            </td>
            <td class="text-red-600">不足</td>
          </tr>
          <tr>
            <td>鸡蛋</td>
            <td>
              <div class="food-amount">
                <div class="food-amount-fill status-high" style="width: 90%"></div>
              </div>
            </td>
            <td class="text-green-600">充足</td>
          </tr>
          <tr>
            <td>牛肉</td>
            <td>
              <div class="food-amount">
                <div class="food-amount-fill status-medium" style="width: 40%"></div>
              </div>
            </td>
            <td class="text-yellow-600">适中</td>
          </tr>
        </tbody>
      </table>
    </div>

    <div class="t-card">
      <div class="t-card-header">
        <span>本周食谱</span>
        <span class="text-sm font-normal text-blue-500">查看全部</span>
      </div>
      
      <div class="recipe-day">
        周一
      </div>
      <div class="recipe-meal">
        <div class="recipe-meal-title">早餐</div>
        <div class="recipe-meal-content">牛奶燕麦粥、水煮蛋、全麦面包</div>
      </div>
      <div class="recipe-meal">
        <div class="recipe-meal-title">午餐</div>
        <div class="recipe-meal-content">西红柿炒鸡蛋、清炒菠菜、米饭</div>
      </div>
      <div class="recipe-meal">
        <div class="recipe-meal-title">晚餐</div>
        <div class="recipe-meal-content">清蒸鲈鱼、土豆丝、紫菜汤</div>
      </div>

      <div class="recipe-day">
        周二
      </div>
      <div class="recipe-meal">
        <div class="recipe-meal-title">早餐</div>
        <div class="recipe-meal-content">豆浆、鸡蛋饼、水果沙拉</div>
      </div>
      <div class="recipe-meal">
        <div class="recipe-meal-title">午餐</div>
        <div class="recipe-meal-content">红烧牛肉、胡萝卜炒西兰花、米饭</div>
      </div>
      <div class="recipe-meal">
        <div class="recipe-meal-title">晚餐</div>
        <div class="recipe-meal-content">蘑菇汤、凉拌黄瓜、杂粮饭</div>
      </div>
    </div>
  </div>

  <!-- 底部导航栏 -->
  <div class="t-tabbar">
    <div class="t-tabbar-item active">
      <div class="t-tabbar-icon">🏠</div>
      <div>首页</div>
    </div>
    <div class="t-tabbar-item">
      <div class="t-tabbar-icon">👨‍👩‍👧‍👦</div>
      <div>我的家庭</div>
    </div>
    <div class="t-tabbar-item">
      <div class="t-tabbar-icon">📷</div>
      <div>我的摄像头</div>
    </div>
  </div>
</body>
</html> 